#include <bits/stdc++.h>
using namespace std;
#define int long long

int n, a[200005], q, an[200005];

namespace CR400AF {
	int dp[2001][2], sum[2001];
	int getl(int l, int r) { return sum[r] - sum[l - 1]; }
	int dfs(int i, int who) { // who == 1 : blue, else red
		if (dp[i][who] != dp[0][0]) return dp[i][who];
		if (i == n) return 0;
		int ans;
		if (who == 0) {
			/*
			   rb...
			*/
			ans = -1ll << 60;
			for (int k = i + 1; k <= n; ++k) {
				ans = max(ans, dfs(k, who ^ 1) + a[k] - sum[k - 1] + sum[i]);
			}
		} else {
			ans = 1ll << 60;
			for (int k = i + 1; k <= n; ++k) {
				ans = min(ans, dfs(k, who ^ 1) - a[k] + sum[k - 1] - sum[i]);
			}
		}
		return dp[i][who] = ans;
	}
	void main() {
		for (int i = 1; i <= n; ++i) sum[i] += sum[i - 1] + a[i];
		for (int i = 1; i <= q; ++i) {
			sum[n] = sum[n - 1] + an[i];
			a[n] = an[i];
			memset(dp, 127, sizeof(dp));
			cout << dfs(2, 0) + a[1] - a[2] << endl;
		}
	}
}
signed main() {
	freopen("pockets.in", "r", stdin);
	freopen("pockets.out", "w", stdout);
	ios::sync_with_stdio(0); cin.tie(0);
	cin >> n;
	for (int i = 1; i < n; ++i) cin >> a[i];
	cin >> q;
	for (int i = 1; i <= q; ++i) cin >> an[i];
	if (n <= 1111) {
		CR400AF::main();
	}else {
		int allsum = 0;
		for (int i = 1; i < n; ++i) allsum += a[i];
		for (int i = 1; i <= q; ++i) {
			cout << a[1] + an[i] - (allsum - a[1]) << "\n";
		}
	}
	return 0;
}
